UART library
UART library
A software defined, industry-standard, UART (Universal Asynchronous Receiver/Transmitter) library that allows you to control an UART serial connection via the xCORE GPIO hardware-response ports. This library is controlled via C using the XMOS multicore extensions.
Features
- UART receive and transmit
- Supports speeds up to 10MBit/s
- Half-duplex mode (applicable to RS485)
- Efficient multi-uart mode for implementing multiple connections
Resource Usage
This following table shows typical resource usage in some different configurations. Exact resource usage will depend on the particular use of the library by the application.
Configuration |
Pins |
Ports |
Clocks |
Ram |
Logical cores |
---|---|---|---|---|---|
Standard TX |
1 |
1 |
0 |
~1.0K |
0 |
Standard TX (buffered) |
1 |
1 |
0 |
~1.2K |
≤ 1 |
Standard RX |
1 |
1 |
0 |
~1.5K |
≤ 1 |
Fast/streaming TX |
1 |
1 |
0 |
~0.2K |
1 |
Fast/streaming RX |
1 |
1 |
0 |
~0.2K |
1 |
Multi-UART TX (8 UARTs) |
8 |
1 |
0 |
~2.9K |
1 |
Multi-UART RX (8 UARTs) |
8 |
1 |
0 |
~3.4K |
1 |
Half Duplex |
1 |
1 |
0 |
~1.8K |
1 |
Software version and dependencies
This document pertains to version 3.0.0 of this library. It is known to work on version 14.1.1 of the xTIMEcomposer tools suite, it may work on other versions.
This library depends on the following other libraries:
- lib_logging (>=2.0.0)
- lib_xassert (>=2.0.0)
- lib_gpio (>=1.0.0)
Related application notes
The following application notes use this library:
- AN00158 - How to use the UART lbirary
- AN00159 - How to run large numbers of UARTS
- AN00163 - Using half duplex UARTS over RS485